#include <iostream>
#include <bits/stdc++.h>

using namespace std;

#define N 100005

int a[N], ans[N];

int main(){
    int n;
    cin >> n;

    while (cin >> n){
        memset(a, 0, sizeof(a));
        memset(ans, 0,  sizeof(ans));

        for (int i = 1; i <= n; i++){
            int left, right;
            cin >> left >> right;
            
            ans[left]++;
            ans[right + 1]--;
        }

        for (int i = 1; i <= n; i++){
            a[i] = a[i - 1] + ans[i];

            if (i != n){
                cout << ans[i] << " ";
            }
            else{
                cout << ans[i];
            }
        }
    }

    return 0;
}